<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AI资讯聚合与分析平台</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
    <link rel="stylesheet" href="../public/css/style.css">
</head>
<body>
    <header class="navbar navbar-expand-lg navbar-dark bg-primary">
        <div class="container">
            <a class="navbar-brand" href="/">
                <i class="bi bi-journal-code me-2"></i>AI资讯聚合与分析平台
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav ms-auto">
                    <li class="nav-item">
                        <a class="nav-link active" href="/">首页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="trends.html">趋势分析</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="papers.html">论文库</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="companies.html">企业动态</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="my-feed.html">个人推荐</a>
                    </li>
                </ul>
                <form class="d-flex ms-3">
                    <input class="form-control me-2" type="search" placeholder="搜索AI资讯..." id="searchInput">
                    <button class="btn btn-light" type="button" id="searchButton">搜索</button>
                </form>
                <div class="ms-3">
                    <a href="login.html" class="btn btn-outline-light">登录</a>
                </div>
            </div>
        </div>
    </header>

    <main class="container my-4">
        <!-- 顶部统计卡片 -->
        <section class="row mb-4">
            <div class="col-md-3">
                <div class="card bg-primary text-white">
                    <div class="card-body">
                        <h5 class="card-title">今日更新</h5>
                        <h2 class="card-text" id="todayUpdateCount">--</h2>
                        <p class="card-text"><small>较昨日 <span id="todayUpdateChange">--</span></small></p>
                    </div>
                </div>
            </div>
            <div class="col-md-3">
                <div class="card bg-success text-white">
                    <div class="card-body">
                        <h5 class="card-title">热门论文</h5>
                        <h2 class="card-text" id="hotPapersCount">--</h2>
                        <p class="card-text"><small>本周新增</small></p>
                    </div>
                </div>
            </div>
            <div class="col-md-3">
                <div class="card bg-info text-white">
                    <div class="card-body">
                        <h5 class="card-title">企业动态</h5>
                        <h2 class="card-text" id="companyNewsCount">--</h2>
                        <p class="card-text"><small>跟踪 <span id="companyCount">--</span> 家企业</small></p>
                    </div>
                </div>
            </div>
            <div class="col-md-3">
                <div class="card bg-warning text-dark">
                    <div class="card-body">
                        <h5 class="card-title">热门话题</h5>
                        <h2 class="card-text" id="hotTopicsCount">--</h2>
                        <p class="card-text"><small>正在讨论中</small></p>
                    </div>
                </div>
            </div>
        </section>

        <!-- 热门话题 -->
        <section class="row mb-4">
            <div class="col-12">
                <div class="card">
                    <div class="card-header d-flex justify-content-between align-items-center">
                        <h4 class="mb-0">热门话题</h4>
                        <div class="btn-group" role="group">
                            <button type="button" class="btn btn-sm btn-outline-primary active" data-period="7">近7天</button>
                            <button type="button" class="btn btn-sm btn-outline-primary" data-period="30">近30天</button>
                        </div>
                    </div>
                    <div class="card-body">
                        <div class="row" id="hotTopics">
                            <!-- 热门话题将通过JS动态加载 -->
                            <div class="col-md-3 mb-3 placeholder-glow">
                                <div class="card">
                                    <div class="card-body">
                                        <h5 class="card-title placeholder"></h5>
                                        <p class="card-text placeholder-glow">
                                            <span class="placeholder col-7"></span>
                                            <span class="placeholder col-4"></span>
                                            <span class="placeholder col-4"></span>
                                            <span class="placeholder col-6"></span>
                                        </p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- 最新资讯和热门论文 -->
        <section class="row mb-4">
            <!-- 最新资讯 -->
            <div class="col-md-8">
                <div class="card">
                    <div class="card-header d-flex justify-content-between align-items-center">
                        <h4 class="mb-0">最新资讯</h4>
                        <div class="dropdown">
                            <button class="btn btn-sm btn-outline-secondary dropdown-toggle" type="button" id="newsFilterDropdown" data-bs-toggle="dropdown">
                                筛选
                            </button>
                            <ul class="dropdown-menu" aria-labelledby="newsFilterDropdown">
                                <li><a class="dropdown-item active" href="#" data-filter="all">全部</a></li>
                                <li><a class="dropdown-item" href="#" data-filter="company_news">企业动态</a></li>
                                <li><a class="dropdown-item" href="#" data-filter="tools">开源工具</a></li>
                                <li><a class="dropdown-item" href="#" data-filter="research">研究进展</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="card-body">
                        <div class="list-group" id="latestNews">
                            <!-- 最新资讯将通过JS动态加载 -->
                            <div class="list-group-item list-group-item-action placeholder-glow">
                                <div class="d-flex w-100 justify-content-between">
                                    <h5 class="mb-1 placeholder col-6"></h5>
                                    <small class="placeholder col-2"></small>
                                </div>
                                <p class="mb-1 placeholder-glow">
                                    <span class="placeholder col-7"></span>
                                    <span class="placeholder col-4"></span>
                                    <span class="placeholder col-4"></span>
                                    <span class="placeholder col-6"></span>
                                </p>
                                <small class="placeholder col-3"></small>
                            </div>
                        </div>
                        <div class="d-flex justify-content-center mt-3">
                            <button class="btn btn-primary" id="loadMoreNews">加载更多</button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 热门论文 -->
            <div class="col-md-4">
                <div class="card">
                    <div class="card-header">
                        <h4 class="mb-0">热门论文</h4>
                    </div>
                    <div class="card-body">
                        <div class="list-group" id="popularPapers">
                            <!-- 热门论文将通过JS动态加载 -->
                            <div class="list-group-item list-group-item-action placeholder-glow">
                                <div class="d-flex w-100 justify-content-between">
                                    <h5 class="mb-1 placeholder col-7"></h5>
                                </div>
                                <p class="mb-1 placeholder-glow">
                                    <span class="placeholder col-7"></span>
                                    <span class="placeholder col-4"></span>
                                </p>
                                <small class="placeholder col-3"></small>
                            </div>
                        </div>
                        <div class="d-flex justify-content-center mt-3">
                            <a href="papers.html" class="btn btn-outline-primary">查看更多</a>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- 企业动态 -->
        <section class="row mb-4">
            <div class="col-12">
                <div class="card">
                    <div class="card-header d-flex justify-content-between align-items-center">
                        <h4 class="mb-0">企业动态</h4>
                        <a href="companies.html" class="btn btn-sm btn-outline-primary">查看全部</a>
                    </div>
                    <div class="card-body">
                        <div class="row" id="companyActivity">
                            <!-- 企业动态将通过JS动态加载 -->
                            <div class="col-md-3 mb-3 placeholder-glow">
                                <div class="card">
                                    <div class="card-body">
                                        <h5 class="card-title placeholder"></h5>
                                        <p class="card-text placeholder-glow">
                                            <span class="placeholder col-7"></span>
                                            <span class="placeholder col-4"></span>
                                            <span class="placeholder col-4"></span>
                                            <span class="placeholder col-6"></span>
                                        </p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main>

    <footer class="bg-dark text-light py-4">
        <div class="container">
            <div class="row">
                <div class="col-md-6">
                    <h5>AI资讯聚合与分析平台</h5>
                    <p>收集、分析和推荐AI领域最新动态的工具，专为AI工程师和研究人员设计。</p>
                </div>
                <div class="col-md-3">
                    <h5>快速链接</h5>
                    <ul class="list-unstyled">
                        <li><a href="/" class="text-light">首页</a></li>
                        <li><a href="trends.html" class="text-light">趋势分析</a></li>
                        <li><a href="papers.html" class="text-light">论文库</a></li>
                        <li><a href="companies.html" class="text-light">企业动态</a></li>
                    </ul>
                </div>
                <div class="col-md-3">
                    <h5>关于我们</h5>
                    <ul class="list-unstyled">
                        <li><a href="#" class="text-light">关于平台</a></li>
                        <li><a href="#" class="text-light">联系我们</a></li>
                        <li><a href="#" class="text-light">API文档</a></li>
                        <li><a href="#" class="text-light">使用条款</a></li>
                    </ul>
                </div>
            </div>
            <hr>
            <div class="text-center">
                <p>&copy; 2023 AI资讯聚合与分析平台. 保留所有权利.</p>
            </div>
        </div>
    </footer>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
    <script src="../public/js/main.js"></script>
    <script src="../public/js/home.js"></script>
</body>
</html> 